
<html>
<head>
  <meta charset="UTF-8">
  <!-- import CSS -->
  <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
<div id="app">
  <template>
    <div class="block">
      <span class="demonstration">默认 Hover 指示器触发</span>
      <el-carousel height="150px">
        <el-carousel-item v-for="item in 4" :key="item">
          <h3 class="small">{{ item }}</h3>
        </el-carousel-item>
      </el-carousel>
    </div>
    <div class="block">
      <span class="demonstration">Click 指示器触发</span>
      <el-carousel trigger="click" height="150px">
        <el-carousel-item v-for="item in arr" :key="item">
          <img :src="item" style="width: 100% ;height:100%" alt="">
        </el-carousel-item>
      </el-carousel>
    </div>
  </template>
  <h1>卡片化</h1>
  <template>
    <el-carousel :interval="4000" type="card" height="200px">
      <el-carousel-item v-for="item in arr" :key="item">
        <img :src="item" style="width: 100% ;height:100%" alt="">
      </el-carousel-item>
    </el-carousel>
  </template>
</div>
</body>
<!-- import Vue before Element -->
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/2.6.14/vue.min.js"></script>
<!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script>
  new Vue({
    el: '#app',
    data: function() {
      return {
        arr:["imgs/b1.jpg","imgs/b2.jpg","imgs/b3.jpg","imgs/b4.jpg"]


      }
    }
  })
</script>
</html>


